<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<h1><fmt:message key="booking.guest.title"/></h1>

<div id="messages">
	<c:if test="${! empty flowRequestContext.messageContext.allMessages}">
	<h2>Erreurs</h2>
		<ul>
		<c:forEach items="${flowRequestContext.messageContext.allMessages}" var="message">
			<li><fmt:message key="${message.source}" /> : ${message.text}</li>
		</c:forEach>
		</ul>
	</c:if>
</div>

<form:form modelAttribute="outputGuest">
	<input type="hidden" name="execution" value="${flowExecutionKey}">

    <fieldset>
    	<!-- infos personne -->
        <div class="form-row">
            <label for="person.firstName"><fmt:message key="guest.firstName"/>:</label>
            <span class="input"><form:input path="firstName" /></span>
        </div>       
        <div class="form-row">
            <label for="lastName"><fmt:message key="guest.lastName"/>:</label>
            <span class="input"><form:input path="lastName" /></span>
        </div>
        <div class="form-row">
            <label for="birthdate"><fmt:message key="guest.birthdate"/>:</label>
            <span class="input"><form:input path="birthdate" /></span>
        </div>

        <div class="form-buttons">
            <div class="button">
                <input type="submit" id="save" name="_eventId_confirm" value="<fmt:message key="button.guest"/>"/>&#160;
                <input type="submit" name="_eventId_cancel" value="<fmt:message key="button.cancel"/>"/>&#160;    
                <input type="submit" name="_eventId_delete" value="<fmt:message key="button.delete"/>"/>&#160;    
            </div>    
        </div>
    </fieldset>
</form:form>